﻿<!DOCTYPE html>
<html lang="zh">

<head resource>
  <meta charset="utf-8">
  <include file="../inc/meta.inc" />
  <link type="text/css" rel="stylesheet" href="styles/public.css">
  <title>试题收藏 - </title>
</head>

<body>
  <script>
    document.body.onselectstart = document.body.oncontextmenu = function () { return false; };
    document.body.onpaste = document.body.oncopy = function () { return false; };
  </script>
  <div id="vapp" v-cloak v-pinchin="pinch" v-pinchout="pinch">
    <loading bubble v-if="loading_init">正在初始化...</loading>
    <card v-else-if="!islogin" @click="window.location.href=commonaddr('signin')">
      <card-title icon="&#xa043">未登录</card-title>
      <card-context>
        <alert>未登录或登录状态失效</alert>
        <p>点击此处登录</p>
      </card-context>
    </card>
    <template v-else>
      <prompt_panel ref="prompt" remark="手式指引的提示面板"></prompt_panel>
      <template remark="顶部栏">
        <div class="topBox">
          <div class="btntop">
            <a icon="&#xe748" :href="'course?couid='+couid"></a>
            <a icon="&#xa020" href="/mobi/"></a>
            <a icon="&#xe813" @click="showCourse=true"></a>
          </div>
          <div>
            <learnmode @change="v=>learnmode=v"></learnmode>
            <icon @click="()=>{$refs['setupmenu'].show=true}">&#xa038</icon>
          </div>
        </div>
        <setupmenu ref="setupmenu" :account="account"></setupmenu>
        <van-popup v-model="showCourse" class="showCourse" ramark="课程信息">
          <template v-if="iscourse">
            <row>《 {{course.Cou_Name}} 》</row>         
            <div>
              <van-button type="default" @click="showCourse=false">取消</van-button>
              <van-button type="primary" :url="'../course/Detail.'+couid">
                <span icon="&#xe813">返回课程</span>
              </van-button>
            </div>
          </template>
          <row v-else>课程不存在</row>
        </van-popup>
      </template>
      <!-- 试题区域-->
      <loading star v-show="loading">试题加载中...</loading>
      <quesarea ref='quesarea' :ques="queslist" :types="types" :mode="learnmode%2" :account="account" :state="state"
        :fontsize="fontsize" @swipe="swipe"></quesarea>
      <!--答题卡-->
      <answersheet ref='answersheet' :questions="queslist" :types="types" :ansstate="state" :data="data"
        @click="(qid,index)=>$refs['quesarea'].setindex(qid,index)"></answersheet>
      <!--底部按钮区 -->
      <footer>
        <div>正确率：{{data.rate}} %</div>
        <div class="count_number">
          <span icon="&#xe67f">{{data.correct}}</span>
          <span icon="&#xe61c">{{data.wrong}}</span>
        </div>
        <div @click="$refs['answersheet'].show()">
          <icon>&#xe75e</icon>
          <span>{{data.answer}}/{{data.num}}</span>
        </div>
      </footer>
    </template>
  </div>


</body>

</html>